]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Stop simulating Shell.global
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 19 Dec 2023 00:48:01 +0000 (01:48 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 21 Dec 2023 15:24:23 +0000 (15:24 +0000)
ExtensionUtils no longer relies on the global object, so we don't
have to simulate it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3067>

subprojects/extensions-app/js/main.js

index dd3da2e25aad4e2ddc80442ea1e47b571c713d87..696f29b5734863d3ed2e25d2bae2399aac0aa942 100644 (file)
@@ -541,22 +541,6 @@ var ExtensionRow = GObject.registerClass({
     }
 });
 
-function initEnvironment() {
-    // Monkey-patch in a "global" object that fakes some Shell utilities
-    // that ExtensionUtils depends on.
-    globalThis.global = {
-        log(...args) {
-            print(args.join(', '));
-        },
-
-        logError(s) {
-            log(`ERROR: ${s}`);
-        },
-
-        userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']),
-    };
-}
-
 /**
  * Main entrypoint for the app
  *
@@ -564,7 +548,6 @@ function initEnvironment() {
  * @returns {void}
  */
 export async function main(argv) {
-    initEnvironment();
     Package.initGettext();
     setConsoleLogDomain('Extensions');